package com.botao.pojo;

public class R {
    private int code;
    private String message;


    public static R success() {
        return new R(200, "操作成功");
    }

    public static R success(String message) {
        return new R(200, message);
    }

    public static R error() {
        return new R(0, "操作失败");
    }

    public static R error(String message) {
        return new R(0, message);
    }

    public R() {
    }

    public R(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
